<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateResumeTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('resumes', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->comment('上传者');
            $table->string('name');
            $table->enum('gender', ['male', 'female', 'secret']);
            $table->string('email');
            $table->string('birthday');
            $table->string('mobile');
            $table->integer('residence')->comment('住址');
            $table->integer('education')->comment('学历');
            $table->string('begin_work_at');
            $table->string('work_status');
            $table->integer('marital_status')->comment('婚姻状况');
            $table->integer('yearly_salary')->comment('年薪');
            $table->string('current_job_title');
            $table->string('current_company');

            $table->dateTime('refresh_at');
            $table->json('tags');

            $table->json('expect_work_cities');
            $table->integer('expect_salary');
            $table->json('expect_industries')->comment('期望行业');
            $table->json('expect_job_titles');

            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('resumes');
    }
}
